Conversation
|
Caution Review failedPull request was closed or merged during review WalkthroughReplace Prettier/ESLint with Biome tooling, standardize many TypeScript imports to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
eslint and prettier with biome (@coderabbitai)eslint and prettier with biome (Migrate to Biome and standardize TypeScript imports)
|
🚀 Expo preview is ready!
|
There was a problem hiding this comment.
Actionable comments posted: 9
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
db/seeders/dictionaryEntries/getDictionaryWords.js (1)
85-98:⚠️ Potential issue | 🔴 CriticalReplace
forEach(async ...)withfor...ofloop to properly await validation before closing stream.Line 85's async forEach callback is not awaited before
writeStream.end()at line 96, which can close the stream while async validation is still running. Any writes queued after the stream ends will be lost, resulting in incomplete JSONL output.Proposed fix
- words.forEach(async (item) => { + for (const item of words) { const isValid = await isValidDictionaryTerm(item.word); if (isValid) { console.log(`Writing word: ${item.word} with frequency: ${item.frequency}`); writeStream.write(`${JSON.stringify(item)}\n`); } else { console.warn('Found illegal word: ', item.word); } - }); + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@db/seeders/dictionaryEntries/getDictionaryWords.js` around lines 85 - 98, The async callback passed to words.forEach does not get awaited, so isValidDictionaryTerm(item.word) and subsequent writeStream.write calls may still be running when writeStream.end() is called; replace the words.forEach(async (item) => { ... }) with an async function using a for...of loop (for (const item of words) { ... }) and await isValidDictionaryTerm(item.word) and the write operations before calling writeStream.end(), ensuring all validations and writes complete; keep references to isValidDictionaryTerm, writeStream.write, and writeStream.end so the loop replaces the words.forEach section.
🟡 Minor comments (12)
src/hooks/useTrainingPuzzle/useTrainingPuzzle.test.ts-6-6 (1)
6-6:⚠️ Potential issue | 🟡 MinorUse the repository’s
import { type X }form for type-only imports.Please switch this to the configured TS import style to keep consistency with project rules.
Proposed change
-import type { Id } from '@/convex/_generated/dataModel'; +import { type Id } from '@/convex/_generated/dataModel';As per coding guidelines, "**/*.{ts,tsx}: Use type-only imports with import { type X } syntax".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/hooks/useTrainingPuzzle/useTrainingPuzzle.test.ts` at line 6, Replace the plain type import with the project's type-only import syntax: change the current import of Id to use the TypeScript type-only form (import { type Id } ...) so the test module's import of Id uses the configured "import { type X }" style; update the import statement that references Id in useTrainingPuzzle.test to use this type-only syntax.src/hooks/mutations/generateUseMutationHook.ts-2-2 (1)
2-2:⚠️ Potential issue | 🟡 MinorConflicts with coding guidelines: import syntax style.
Same as in
generateUseQueryHook.ts, this change converts fromimport { type FunctionReference }toimport type { FunctionReference }, which conflicts with the coding guidelines that specify: "Use type-only imports withimport { type X }syntax".Ensure consistency across the codebase by either configuring Biome to use the inline type import syntax or updating the guidelines.
As per coding guidelines: "Use type-only imports with import { type X } syntax"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/hooks/mutations/generateUseMutationHook.ts` at line 2, The import in generateUseMutationHook.ts uses the `import type { FunctionReference } from 'convex/server'` form which conflicts with the project's guideline requiring inline type imports; change the import to the inline type-only syntax used elsewhere (e.g., `import { type FunctionReference } from 'convex/server'`) so it matches generateUseQueryHook.ts and the codebase convention, and verify no other imports in this file use `import type` so the file is consistent.src/hooks/queries/generateUseQueryHook.ts-2-2 (1)
2-2:⚠️ Potential issue | 🟡 MinorConflicts with coding guidelines: import syntax style.
The change converts from
import { type FunctionReference }toimport type { FunctionReference }, but the coding guidelines explicitly state: "Use type-only imports withimport { type X }syntax" (inline type imports).While both syntaxes are valid TypeScript, this creates an inconsistency between the code and documented guidelines. Consider either:
- Configuring Biome to use inline type imports (
import { type X }) to match the guidelines- Or updating the coding guidelines to reflect the new preference for
import type { X }As per coding guidelines: "Use type-only imports with import { type X } syntax"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/hooks/queries/generateUseQueryHook.ts` at line 2, The import in generateUseQueryHook.ts uses the `import type { FunctionReference }` form which conflicts with the project's guideline to use inline type imports; change the import to the inline type syntax `import { type FunctionReference } from 'convex/server'` so it matches other files (or, if you prefer to adopt the `import type` form project-wide, update the Biome/formatter config and the coding guidelines accordingly); ensure any other occurrences of `import type { ... }` are adjusted consistently.src/hooks/useUser/useUser.ts-6-6 (1)
6-6:⚠️ Potential issue | 🟡 MinorUse inline type specifiers to match repository style.
Switch to
import { type X }syntax here to align with the project's required TypeScript import style.Proposed fix
-import type { CreateUser, PatchUser } from '@/convex/users/models'; +import { type CreateUser, type PatchUser } from '@/convex/users/models';🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/hooks/useUser/useUser.ts` at line 6, Update the import to use inline type specifiers to match repo style: change the import that brings in CreateUser and PatchUser in useUser.ts so it uses the `type` keyword inline (i.e., import { type CreateUser, type PatchUser } from '...') instead of `import type { CreateUser, PatchUser }`, ensuring other code references to CreateUser and PatchUser remain unchanged.src/utils/notifications.test.ts-93-93 (1)
93-93:⚠️ Potential issue | 🟡 MinorFix typo in test description.
The test description contains "requestPermissionsAsyn" which should be "requestPermissionsAsync" (missing the final 'c').
✏️ Proposed fix
- ])('should use the status received from the requestPermissionsAsyn when status of getPermissionsAsync is %s', async (getPermissionsAsyncStatus) => { + ])('should use the status received from the requestPermissionsAsync when status of getPermissionsAsync is %s', async (getPermissionsAsyncStatus) => {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/utils/notifications.test.ts` at line 93, The test title string in the Jest test starting with "should use the status received from the requestPermissionsAsyn when status of getPermissionsAsync is %s" contains a typo; update that string to "requestPermissionsAsync" (add the missing 'c') so the description reads "should use the status received from the requestPermissionsAsync when status of getPermissionsAsync is %s" in the test case that iterates over getPermissionsAsyncStatus.src/components/navigation/GenericStackScreen/GenericStackScreen.tsx-2-2 (1)
2-2:⚠️ Potential issue | 🟡 MinorUse inline type modifier for PropsWithChildren import.
Replace
import type { PropsWithChildren } from 'react';withimport { type PropsWithChildren } from 'react';to align with the project's type-only import syntax preference.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/navigation/GenericStackScreen/GenericStackScreen.tsx` at line 2, Replace the type-only import syntax on GenericStackScreen by changing the import of PropsWithChildren to use the inline type modifier; update the existing import statement that references PropsWithChildren so it reads with "import { type PropsWithChildren } from 'react';" (locate the import that currently says "import type { PropsWithChildren } from 'react';" and adjust it accordingly).src/components/elements/GuessGrid/GuessGrid.types.ts-1-1 (1)
1-1:⚠️ Potential issue | 🟡 MinorUse
import { type X }syntax for type imports.Change
import type { CheckedLetter, PuzzleGuessAttempt }toimport { type CheckedLetter, type PuzzleGuessAttempt }to align with project conventions.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/elements/GuessGrid/GuessGrid.types.ts` at line 1, The import in GuessGrid.types.ts should use the `import { type ... }` form; replace the current `import type { CheckedLetter, PuzzleGuessAttempt }` with `import { type CheckedLetter, type PuzzleGuessAttempt }` so both CheckedLetter and PuzzleGuessAttempt are explicitly imported as types and follow project conventions.src/hooks/useDailyPuzzle/useDailyPuzzle.test.ts-6-6 (1)
6-6:⚠️ Potential issue | 🟡 MinorUse the configured type-import style in tests too.
Switch to
import { type Id } from '@/convex/_generated/dataModel';for guideline consistency. Per coding guidelines, type-only imports must useimport { type X }syntax, notimport type { X }.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/hooks/useDailyPuzzle/useDailyPuzzle.test.ts` at line 6, Change the type-only import style to match project guidelines: replace the current import using the "import type { Id }" form with the "import { type Id } from '@/convex/_generated/dataModel';" style in the test file (referencing the Id type import at the top of src/hooks/useDailyPuzzle/useDailyPuzzle.test.ts) so tests use the configured type-import syntax.src/utils/puzzles.ts-3-3 (1)
3-3:⚠️ Potential issue | 🟡 MinorUse the correct type-only import syntax.
Switch to
import { type Puzzle } from '@/convex/puzzles/models';to match the project's TypeScript import convention defined in CLAUDE.md.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/utils/puzzles.ts` at line 3, Update the import to use TypeScript's type-only import form: replace the current default-style import of Puzzle with an explicit type import for the Puzzle symbol from '@/convex/puzzles/models' (i.e., use "import { type Puzzle } from '@/convex/puzzles/models';") so it follows the project's CLAUDE.md convention and signals this is a type-only dependency.src/components/ui/Card/Card.tsx-2-2 (1)
2-2:⚠️ Potential issue | 🟡 MinorUse inline type specifiers for type-only imports.
Change to
import { type PropsWithChildren, type ReactNode } from 'react';to match the required type-import syntax.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/ui/Card/Card.tsx` at line 2, The import uses a type-only import statement; update the import to use inline type specifiers by changing the import of PropsWithChildren and ReactNode to `import { type PropsWithChildren, type ReactNode } from 'react';` so both PropsWithChildren and ReactNode are explicitly marked as types in the import that appears at the top of the Card component file (the existing import line that currently reads `import type { PropsWithChildren, ReactNode } from 'react';`).src/components/ui/TextInput/TextInput.tsx-31-31 (1)
31-31:⚠️ Potential issue | 🟡 MinorPlace
refbefore other JSX props in this component.
refshould come first, then remaining props in sorted order for this codebase convention.♻️ Suggested adjustment
-export function TextInput({ error, ref, label, style, ...rest }: Readonly<Props>) { +export function TextInput({ error, ref, label, style, accessibilityLabel, ...rest }: Readonly<Props>) { @@ - <UniTextInput {...rest} accessibilityLabel={label ?? rest.placeholder} ref={ref} style={[styles.input, style]} /> + <UniTextInput + ref={ref} + accessibilityLabel={accessibilityLabel ?? label ?? rest.placeholder} + style={[styles.input, style]} + {...rest} + />Based on learnings: Applies to src/**/*.{tsx} : JSX props must have key and ref come first, remaining props in alphabetical order.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/ui/TextInput/TextInput.tsx` at line 31, Move the ref prop to be the first JSX prop on UniTextInput, then order the remaining explicit props alphabetically (e.g. accessibilityLabel, style) and place the {...rest} spread last so explicit props are not accidentally shadowed; update the UniTextInput element in TextInput.tsx to follow that ordering.src/components/elements/DailyPuzzleUsersPresence/DailyPuzzleUsersPresence.test.tsx-66-66 (1)
66-66:⚠️ Potential issue | 🟡 MinorFix test-title placeholder key typo.
Line 66 uses
$numberOfOnlinePlayers, but the table data key isnumOfOnlinePlayers, so the interpolated count won’t render in test names.Suggested patch
- ])('should render "$expectedText" when there are $numberOfOnlinePlayers online', ({ + ])('should render "$expectedText" when there are $numOfOnlinePlayers online', ({🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/elements/DailyPuzzleUsersPresence/DailyPuzzleUsersPresence.test.tsx` at line 66, The test title uses the wrong placeholder `$numberOfOnlinePlayers` so the interpolated count never appears; update the table-driven test title (the string passed to the test/it call) to use the correct key `$numOfOnlinePlayers` that matches the data in the test table (referencing the existing placeholders `expectedText` and `numOfOnlinePlayers` in DailyPuzzleUsersPresence.test.tsx) so test names render the online player count correctly.
🧹 Nitpick comments (7)
src/context/Prompt/Prompt.context.ts (1)
3-3: Import syntax doesn't match coding guidelines.The change uses
import type { PromptProviderProps }but the coding guidelines specify usingimport { type X }syntax for type-only imports.Both syntaxes work correctly for type-only imports, but the codebase convention states: "Type-only imports must use
import { type X }syntax."Consider reverting to the inline type syntax for consistency:
Suggested change
-import type { PromptProviderProps } from './Prompt.types'; +import { type PromptProviderProps } from './Prompt.types';As per coding guidelines: "Use type-only imports with import { type X } syntax"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/context/Prompt/Prompt.context.ts` at line 3, Replace the type-only import to follow the codebase convention by changing the import statement that references PromptProviderProps to use the inline type syntax (import { type PromptProviderProps } ...) instead of import type { PromptProviderProps }, so update the import that currently names PromptProviderProps in Prompt.context to the { type ... } form for consistency.src/hooks/useLeaderboards/useLeaderboards.test.ts (1)
9-9: Use the project’s inline type-import convention.Line 9 currently uses
import type { Id } ...; repository style requiresimport { type Id } ....As per coding guidelines,
**/*.{ts,tsx}: Use type-only imports withimport { type X }syntax.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/hooks/useLeaderboards/useLeaderboards.test.ts` at line 9, Replace the type-only import to match project convention: change the existing import statement that references Id from "import type { Id } from '@/convex/_generated/dataModel';" to use the inline type-import style ("import { type Id } from '@/convex/_generated/dataModel';"), ensuring the symbol Id is imported with the "type" modifier inside the braces.jest.setup.tsx (1)
1-2: Please switch to inline type imports for consistency with repo rules.Lines 1-2 use
import type { ... }; codebase convention expectsimport { type ... }.As per coding guidelines,
**/*.{ts,tsx}: Use type-only imports withimport { type X }syntax.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@jest.setup.tsx` around lines 1 - 2, The imports in jest.setup.tsx use standalone "import type" syntax; update them to inline type imports to follow repo convention by changing the two lines importing Octicons and ComponentProps to use "import { type Octicons } from '@expo/vector-icons'" and "import { type ComponentProps } from 'react'"; ensure only the syntax changes (types remain type-only) and no runtime imports are altered.src/__tests__/settings.test.tsx (1)
6-6: Please align type imports with the repo’s inline style.Lines 6 and 10 use
import type { ... }; this codebase guideline expectsimport { type ... }.As per coding guidelines,
**/*.{ts,tsx}: Use type-only imports withimport { type X }syntax.Also applies to: 10-10
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/__tests__/settings.test.tsx` at line 6, Update the type-only imports to the repo's preferred inline style: replace the `import type { ComponentProps } from 'react'` form with the `import { type ComponentProps } from 'react'` syntax, and do the same for the other type-only import on line 10 (replace `import type { ... }` with `import { type ... }`) so both ComponentProps and the second imported type use the `import { type ... }` form.src/context/ActionSheet/ActionSheet.provider.tsx (1)
9-9: Use inline type-import syntax to match repo convention.Line 9 uses
import type { ... }, while this repo rule expectsimport { type ... }.As per coding guidelines,
**/*.{ts,tsx}: Use type-only imports withimport { type X }syntax.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/context/ActionSheet/ActionSheet.provider.tsx` at line 9, The import uses the non-preferred "import type { ActionSheetPressCallback }" form; update it to the repo convention by changing the import to the inline type-import syntax "import { type ActionSheetPressCallback } from './ActionSheet.types';" so the ActionSheet.provider.tsx file (and specifically the ActionSheetPressCallback import) follows the project's type-only import rule.src/components/ui/RadioInput/RadioInput.types.ts (1)
15-18: Type safety reduction by removing generic from context.The change from
Pick<RadioInputProps<Value>, 'value' | 'onChange'>to a non-generic{ onChange: (newValue: string) => void; value?: string }loses compile-time type narrowing. Consumers likesettings.tsxexpectonChangeto receive only specific string literals (e.g.,'qwerty' | 'abcde'or'system' | 'light' | 'dark'), but the context now accepts anystring.This is mitigated by the
as Valuecast inRadioInput.tsx, so runtime behavior is preserved. However, if anRadioInput.Itemis added with an invalidvaluestring, TypeScript won't catch the mismatch.If this simplification is intentional for Biome compatibility or other reasons, consider documenting the trade-off.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/ui/RadioInput/RadioInput.types.ts` around lines 15 - 18, The RadioInputContextProps type lost its generic, reducing type safety; change RadioInputContextProps back to a generic (e.g., RadioInputContextProps<Value extends string>) and type it as Pick<RadioInputProps<Value>, 'value' | 'onChange'> or equivalently { onChange: (newValue: Value) => void; value?: Value }, then update the RadioInput context creation and the provider usage in RadioInput.tsx to use the same generic Value so consumers (like settings.tsx and RadioInput.Item) get compile-time narrowing and you can remove the unsafe `as Value` cast.src/components/ui/RadioInput/RadioInput.tsx (1)
19-20: Unchecked type cast bridges generic to non-generic context.The
as Valuecast on line 19 bypasses TypeScript's type validation. While this works at runtime whenRadioInput.Itemvalues match the expectedValueunion, TypeScript cannot catch mismatches like:<RadioInput<'light' | 'dark'> onChange={handler} value="light"> <RadioInput.Item value="invalid" label="Oops" /> {/* No compile error */} </RadioInput>The memoization pattern itself is correct. If preserving full type safety is important, consider keeping the generic on the context type or adding runtime validation.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/ui/RadioInput/RadioInput.tsx` around lines 19 - 20, The unchecked cast in handleChange (newValue: string) => onChange(newValue as Value) should be removed and the context should preserve the generic Value type so TypeScript can validate item values; update the RadioInput context type to be generic (e.g., RadioInputContext<Value>) and change handleChange to accept Value (or narrow/validate the incoming value before calling onChange) so contextValue is memoized with the correctly typed handleChange and value, ensuring RadioInput.Item values are type-checked against the RadioInput<Value> generic rather than bypassed by an any/string cast.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.zed/settings.json:
- Around line 34-38: Remove the unsupported Biome YAML formatter configuration:
delete or replace the "YAML" -> "formatter" -> "language_server" entry that sets
{ "name": "biome" } (the "YAML" block and its "formatter" / "language_server"
keys) and either remove the YAML formatter section entirely or point it to a
supported formatter (e.g., Prettier or yamlfmt) so the settings no longer
reference Biome for YAML formatting.
In `@convex/leaderboards/queries.ts`:
- Line 1: The import in queries.ts should follow the project's type-only import
style; replace the current "import type { NamedTableInfo, Query } from
'convex/server'" with the guideline-compliant form using explicit type markers
for each symbol (i.e., import { type NamedTableInfo, type Query } from
'convex/server') so that NamedTableInfo and Query are imported as type-only
imports.
- Line 7: The import uses the "import type { DataModel, Id }" form which
conflicts with the repo guideline; change it to the style-required type-only
syntax by using named imports with the type modifier (e.g., import { type
DataModel, type Id } from '../_generated/dataModel'), updating the import that
references DataModel and Id in convex/leaderboards/queries.ts so both symbols
are imported as type-only with the "type" modifier on each identifier.
- Line 10: The import in convex/leaderboards/queries.ts should use the project's
preferred type-only syntax; replace the current `import type { User }` with the
guideline-compliant `import { type User }` form so the User type is imported as
a type-only binding; locate the import of User at the top of the file and update
that statement accordingly.
In `@src/components/elements/GuessGrid/GuessGrid.test.tsx`:
- Line 3: Replace the current type-only import using the "import type { Id }"
form with the project-preferred "import { type Id }" syntax; update the import
statement at the top of GuessGrid.test.tsx so it reads using the named import
modifier (referencing the Id type) and ensure the file imports follow the coding
guideline "Use type-only imports with import { type X } syntax".
In `@src/components/elements/GuessGrid/GuessGrid.tsx`:
- Line 7: Revert the import to use inline type-only specifiers per the coding
guideline: change the current top-level "import type { GuessGridCellProps,
GuessGridProps }" back to the inline form "import { type GuessGridCellProps,
type GuessGridProps }" (apply the same pattern for any other files in this PR
that were converted), locating the import in GuessGrid.tsx and any other modules
that now use "import type" and replace with the "{ type X }" syntax for each
type symbol.
In `@src/tests/fixtures/leaderboards.ts`:
- Around line 1-2: The imports in leaderboards.ts should use the inline
type-only import syntax per guidelines; change the top imports so Id,
LeaderboardWithScores, and any other types are imported with the pattern import
{ type Id } and import { type LeaderboardWithScores, leaderboardType } (i.e.,
keep non-type exports like leaderboardType as normal imports and mark only types
with the inline "type" modifier) instead of converting the entire statements to
top-level "import type" declarations.
In `@src/tests/fixtures/puzzleGuessAttempts.ts`:
- Line 1: The import in puzzleGuessAttempts.ts uses the `import type { Id }`
form which conflicts with the repo guideline; change it to the preferred
type-only import syntax `import { type Id }` so the type is imported with the
`type` modifier inside the braces (update the import that references the `Id`
type accordingly).
In `@src/tests/fixtures/puzzles.ts`:
- Line 1: The import uses the banned "import type { Id }" form; change it to the
project-preferred type-only import syntax "import { type Id }" so the type Id is
imported using the named type-only form (look for the Id import in
src/tests/fixtures/puzzles.ts and replace the current import statement
accordingly).
---
Outside diff comments:
In `@db/seeders/dictionaryEntries/getDictionaryWords.js`:
- Around line 85-98: The async callback passed to words.forEach does not get
awaited, so isValidDictionaryTerm(item.word) and subsequent writeStream.write
calls may still be running when writeStream.end() is called; replace the
words.forEach(async (item) => { ... }) with an async function using a for...of
loop (for (const item of words) { ... }) and await
isValidDictionaryTerm(item.word) and the write operations before calling
writeStream.end(), ensuring all validations and writes complete; keep references
to isValidDictionaryTerm, writeStream.write, and writeStream.end so the loop
replaces the words.forEach section.
---
Minor comments:
In
`@src/components/elements/DailyPuzzleUsersPresence/DailyPuzzleUsersPresence.test.tsx`:
- Line 66: The test title uses the wrong placeholder `$numberOfOnlinePlayers` so
the interpolated count never appears; update the table-driven test title (the
string passed to the test/it call) to use the correct key `$numOfOnlinePlayers`
that matches the data in the test table (referencing the existing placeholders
`expectedText` and `numOfOnlinePlayers` in DailyPuzzleUsersPresence.test.tsx) so
test names render the online player count correctly.
In `@src/components/elements/GuessGrid/GuessGrid.types.ts`:
- Line 1: The import in GuessGrid.types.ts should use the `import { type ... }`
form; replace the current `import type { CheckedLetter, PuzzleGuessAttempt }`
with `import { type CheckedLetter, type PuzzleGuessAttempt }` so both
CheckedLetter and PuzzleGuessAttempt are explicitly imported as types and follow
project conventions.
In `@src/components/navigation/GenericStackScreen/GenericStackScreen.tsx`:
- Line 2: Replace the type-only import syntax on GenericStackScreen by changing
the import of PropsWithChildren to use the inline type modifier; update the
existing import statement that references PropsWithChildren so it reads with
"import { type PropsWithChildren } from 'react';" (locate the import that
currently says "import type { PropsWithChildren } from 'react';" and adjust it
accordingly).
In `@src/components/ui/Card/Card.tsx`:
- Line 2: The import uses a type-only import statement; update the import to use
inline type specifiers by changing the import of PropsWithChildren and ReactNode
to `import { type PropsWithChildren, type ReactNode } from 'react';` so both
PropsWithChildren and ReactNode are explicitly marked as types in the import
that appears at the top of the Card component file (the existing import line
that currently reads `import type { PropsWithChildren, ReactNode } from
'react';`).
In `@src/components/ui/TextInput/TextInput.tsx`:
- Line 31: Move the ref prop to be the first JSX prop on UniTextInput, then
order the remaining explicit props alphabetically (e.g. accessibilityLabel,
style) and place the {...rest} spread last so explicit props are not
accidentally shadowed; update the UniTextInput element in TextInput.tsx to
follow that ordering.
In `@src/hooks/mutations/generateUseMutationHook.ts`:
- Line 2: The import in generateUseMutationHook.ts uses the `import type {
FunctionReference } from 'convex/server'` form which conflicts with the
project's guideline requiring inline type imports; change the import to the
inline type-only syntax used elsewhere (e.g., `import { type FunctionReference }
from 'convex/server'`) so it matches generateUseQueryHook.ts and the codebase
convention, and verify no other imports in this file use `import type` so the
file is consistent.
In `@src/hooks/queries/generateUseQueryHook.ts`:
- Line 2: The import in generateUseQueryHook.ts uses the `import type {
FunctionReference }` form which conflicts with the project's guideline to use
inline type imports; change the import to the inline type syntax `import { type
FunctionReference } from 'convex/server'` so it matches other files (or, if you
prefer to adopt the `import type` form project-wide, update the Biome/formatter
config and the coding guidelines accordingly); ensure any other occurrences of
`import type { ... }` are adjusted consistently.
In `@src/hooks/useDailyPuzzle/useDailyPuzzle.test.ts`:
- Line 6: Change the type-only import style to match project guidelines: replace
the current import using the "import type { Id }" form with the "import { type
Id } from '@/convex/_generated/dataModel';" style in the test file (referencing
the Id type import at the top of
src/hooks/useDailyPuzzle/useDailyPuzzle.test.ts) so tests use the configured
type-import syntax.
In `@src/hooks/useTrainingPuzzle/useTrainingPuzzle.test.ts`:
- Line 6: Replace the plain type import with the project's type-only import
syntax: change the current import of Id to use the TypeScript type-only form
(import { type Id } ...) so the test module's import of Id uses the configured
"import { type X }" style; update the import statement that references Id in
useTrainingPuzzle.test to use this type-only syntax.
In `@src/hooks/useUser/useUser.ts`:
- Line 6: Update the import to use inline type specifiers to match repo style:
change the import that brings in CreateUser and PatchUser in useUser.ts so it
uses the `type` keyword inline (i.e., import { type CreateUser, type PatchUser }
from '...') instead of `import type { CreateUser, PatchUser }`, ensuring other
code references to CreateUser and PatchUser remain unchanged.
In `@src/utils/notifications.test.ts`:
- Line 93: The test title string in the Jest test starting with "should use the
status received from the requestPermissionsAsyn when status of
getPermissionsAsync is %s" contains a typo; update that string to
"requestPermissionsAsync" (add the missing 'c') so the description reads "should
use the status received from the requestPermissionsAsync when status of
getPermissionsAsync is %s" in the test case that iterates over
getPermissionsAsyncStatus.
In `@src/utils/puzzles.ts`:
- Line 3: Update the import to use TypeScript's type-only import form: replace
the current default-style import of Puzzle with an explicit type import for the
Puzzle symbol from '@/convex/puzzles/models' (i.e., use "import { type Puzzle }
from '@/convex/puzzles/models';") so it follows the project's CLAUDE.md
convention and signals this is a type-only dependency.
---
Nitpick comments:
In `@jest.setup.tsx`:
- Around line 1-2: The imports in jest.setup.tsx use standalone "import type"
syntax; update them to inline type imports to follow repo convention by changing
the two lines importing Octicons and ComponentProps to use "import { type
Octicons } from '@expo/vector-icons'" and "import { type ComponentProps } from
'react'"; ensure only the syntax changes (types remain type-only) and no runtime
imports are altered.
In `@src/__tests__/settings.test.tsx`:
- Line 6: Update the type-only imports to the repo's preferred inline style:
replace the `import type { ComponentProps } from 'react'` form with the `import
{ type ComponentProps } from 'react'` syntax, and do the same for the other
type-only import on line 10 (replace `import type { ... }` with `import { type
... }`) so both ComponentProps and the second imported type use the `import {
type ... }` form.
In `@src/components/ui/RadioInput/RadioInput.tsx`:
- Around line 19-20: The unchecked cast in handleChange (newValue: string) =>
onChange(newValue as Value) should be removed and the context should preserve
the generic Value type so TypeScript can validate item values; update the
RadioInput context type to be generic (e.g., RadioInputContext<Value>) and
change handleChange to accept Value (or narrow/validate the incoming value
before calling onChange) so contextValue is memoized with the correctly typed
handleChange and value, ensuring RadioInput.Item values are type-checked against
the RadioInput<Value> generic rather than bypassed by an any/string cast.
In `@src/components/ui/RadioInput/RadioInput.types.ts`:
- Around line 15-18: The RadioInputContextProps type lost its generic, reducing
type safety; change RadioInputContextProps back to a generic (e.g.,
RadioInputContextProps<Value extends string>) and type it as
Pick<RadioInputProps<Value>, 'value' | 'onChange'> or equivalently { onChange:
(newValue: Value) => void; value?: Value }, then update the RadioInput context
creation and the provider usage in RadioInput.tsx to use the same generic Value
so consumers (like settings.tsx and RadioInput.Item) get compile-time narrowing
and you can remove the unsafe `as Value` cast.
In `@src/context/ActionSheet/ActionSheet.provider.tsx`:
- Line 9: The import uses the non-preferred "import type {
ActionSheetPressCallback }" form; update it to the repo convention by changing
the import to the inline type-import syntax "import { type
ActionSheetPressCallback } from './ActionSheet.types';" so the
ActionSheet.provider.tsx file (and specifically the ActionSheetPressCallback
import) follows the project's type-only import rule.
In `@src/context/Prompt/Prompt.context.ts`:
- Line 3: Replace the type-only import to follow the codebase convention by
changing the import statement that references PromptProviderProps to use the
inline type syntax (import { type PromptProviderProps } ...) instead of import
type { PromptProviderProps }, so update the import that currently names
PromptProviderProps in Prompt.context to the { type ... } form for consistency.
In `@src/hooks/useLeaderboards/useLeaderboards.test.ts`:
- Line 9: Replace the type-only import to match project convention: change the
existing import statement that references Id from "import type { Id } from
'@/convex/_generated/dataModel';" to use the inline type-import style ("import {
type Id } from '@/convex/_generated/dataModel';"), ensuring the symbol Id is
imported with the "type" modifier inside the braces.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8a4d030e-a0d3-432e-94e8-00437d34b60f
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (86)
.prettierignore.zed/settings.jsonCLAUDE.mdbabel.config.cjsbiome.jsonconvex/leaderboards/queries.tsconvex/migrations.tsconvex/shared/queries.tsdb/seeders/dictionaryEntries/getDictionaryWords.jsdb/seeders/dictionaryEntries/getDictionaryWordsExplanations.jseslint.config.jsjest.setup.tsxpackage.jsonprettier.config.jssrc/__tests__/index.test.tsxsrc/__tests__/leaderboards/all-time-leaderboard.test.tsxsrc/__tests__/leaderboards/weekly-leaderboard.test.tsxsrc/__tests__/onboard/create-account.test.tsxsrc/__tests__/onboard/restore-account.test.tsxsrc/__tests__/play/daily-puzzle-solved.test.tsxsrc/__tests__/play/training-puzzle-solved.test.tsxsrc/__tests__/settings.test.tsxsrc/__tests__/update-nickname.test.tsxsrc/app/(authenticated)/index.tsxsrc/app/(authenticated)/leaderboards/weekly-leaderboard.tsxsrc/app/(authenticated)/play/daily-puzzle-solved.tsxsrc/app/(authenticated)/play/daily-puzzle.tsxsrc/app/(authenticated)/play/training-puzzle-solved.tsxsrc/app/(authenticated)/update-nickname.tsxsrc/app/_layout.tsxsrc/app/onboard/create-account.tsxsrc/app/onboard/restore-account.tsxsrc/components/elements/DailyPuzzleUsersPresence/DailyPuzzleUsersPresence.test.tsxsrc/components/elements/DailyPuzzleUsersPresence/DailyPuzzleUsersPresence.tsxsrc/components/elements/GuessGrid/GuessGrid.helpers.tssrc/components/elements/GuessGrid/GuessGrid.hook.tssrc/components/elements/GuessGrid/GuessGrid.test.tsxsrc/components/elements/GuessGrid/GuessGrid.tsxsrc/components/elements/GuessGrid/GuessGrid.types.tssrc/components/elements/HistoryGrid/HistoryGrid.test.tsxsrc/components/elements/HistoryGrid/HistoryGrid.tsxsrc/components/elements/Keyboard/Keyboard.test.tsxsrc/components/elements/Keyboard/Keyboard.tsxsrc/components/elements/Leaderboard/Leaderboard.tsxsrc/components/navigation/GenericStackScreen/GenericStackScreen.tsxsrc/components/ui/Button/Button.tsxsrc/components/ui/Card/Card.tsxsrc/components/ui/Hint/Hint.test.tsxsrc/components/ui/Hint/Hint.tsxsrc/components/ui/RadioInput/RadioInput.context.tssrc/components/ui/RadioInput/RadioInput.test.tsxsrc/components/ui/RadioInput/RadioInput.tsxsrc/components/ui/RadioInput/RadioInput.types.tssrc/components/ui/Text/Text.tsxsrc/components/ui/TextInput/TextInput.tsxsrc/context/ActionSheet/ActionSheet.context.tssrc/context/ActionSheet/ActionSheet.provider.tsxsrc/context/ActionSheet/ActionSheet.test.tsxsrc/context/ActionSheet/ActionSheet.types.tssrc/context/Prompt/Prompt.context.tssrc/context/Prompt/Prompt.provider.tsxsrc/context/Prompt/Prompt.test.tsxsrc/context/Prompt/Prompt.types.tssrc/hooks/mutations/generateUseMutationHook.test.tssrc/hooks/mutations/generateUseMutationHook.tssrc/hooks/queries/generateUseQueryHook.tssrc/hooks/useDailyPuzzle/useDailyPuzzle.test.tssrc/hooks/useGameplaySettings/useGameplaySettings.test.tssrc/hooks/useLeaderboards/useLeaderboards.test.tssrc/hooks/useLeaderboards/useLeaderboards.tssrc/hooks/usePlural/usePlural.test.tssrc/hooks/usePushNotifications/usePushNotifications.tssrc/hooks/usePuzzlesStatistics/usePuzzlesStatistics.test.tssrc/hooks/usePuzzlesStatistics/usePuzzlesStatistics.tssrc/hooks/useToaster/useToaster.test.tssrc/hooks/useTrainingPuzzle/useTrainingPuzzle.test.tssrc/hooks/useUser/useUser.tssrc/tests/fixtures/leaderboards.tssrc/tests/fixtures/puzzleGuessAttempts.tssrc/tests/fixtures/puzzleStatistics.tssrc/tests/fixtures/puzzles.tssrc/tests/fixtures/users.tssrc/utils/clone.tssrc/utils/notifications.test.tssrc/utils/puzzles.tssrc/utils/words.ts
💤 Files with no reviewable changes (3)
- .prettierignore
- eslint.config.js
- prettier.config.js
|
@coderabbitai re-review |
|
🧠 Learnings used✅ Actions performedFull review triggered. |
Summary by CodeRabbit
Bug Fixes
Refactor
Style
Tests
Documentation
Chores